<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-userMsg-edit" th:object="${userMsg}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">开发者微信号：</label>
				<div class="col-sm-8">
					<input id="toUserName" name="toUserName" th:field="*{toUserName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">发送方帐号（一个OpenID）：</label>
				<div class="col-sm-8">
					<input id="fromUserName" name="fromUserName" th:field="*{fromUserName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">消息创建时间 （整型）：</label>
				<div class="col-sm-8">
					<input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">消息类型，文本为text：</label>
				<div class="col-sm-8">
					<input id="msgType" name="msgType" th:field="*{msgType}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">回复的消息内容（换行：在content中能够换行，微信客户端就支持换行显示）：</label>
				<div class="col-sm-8">
					<input id="content" name="content" th:field="*{content}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">消息id，64位整型：</label>
				<div class="col-sm-8">
					<input id="msgId" name="msgId" th:field="*{msgId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">图片链接（由系统生成）：</label>
				<div class="col-sm-8">
					<input id="picUrl" name="picUrl" th:field="*{picUrl}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">图片消息媒体id，可以调用获取临时素材接口拉取数据。：</label>
				<div class="col-sm-8">
					<input id="mediaId" name="mediaId" th:field="*{mediaId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">语音格式，如amr，speex等：</label>
				<div class="col-sm-8">
					<input id="format" name="format" th:field="*{format}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">视频消息缩略图的媒体id，可以调用多媒体文件下载接口拉取数据。：</label>
				<div class="col-sm-8">
					<input id="thumbMediaid" name="thumbMediaid" th:field="*{thumbMediaid}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">地理位置维度：</label>
				<div class="col-sm-8">
					<input id="locationX" name="locationX" th:field="*{locationX}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">地理位置经度：</label>
				<div class="col-sm-8">
					<input id="locationY" name="locationY" th:field="*{locationY}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">地图缩放大小：</label>
				<div class="col-sm-8">
					<input id="scale" name="scale" th:field="*{scale}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">地理位置信息：</label>
				<div class="col-sm-8">
					<input id="label" name="label" th:field="*{label}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">消息标题：</label>
				<div class="col-sm-8">
					<input id="title" name="title" th:field="*{title}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">消息描述：</label>
				<div class="col-sm-8">
					<input id="description" name="description" th:field="*{description}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">消息链接：</label>
				<div class="col-sm-8">
					<input id="url" name="url" th:field="*{url}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "wx/userMsg";
		$("#form-userMsg-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-userMsg-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
